package io.github.lee.plugin.depend.impl

import io.github.lee.plugin.depend.Versions
import io.github.lee.plugin.depend.handler.IHandlerDepend
import io.github.lee.plugin.depend.handler.implementation
import io.github.lee.plugin.depend.handler.kapt
import org.gradle.api.artifacts.dsl.DependencyHandler

object Lifecycle : IHandlerDepend {
    private const val lifecycleViewmodelKtx =
        "androidx.lifecycle:lifecycle-viewmodel-ktx:${Versions.lifecycleViewModelKtx}"
    private const val lifecycleLivedataKtx =
        "androidx.lifecycle:lifecycle-livedata-ktx:${Versions.lifecycleViewModelKtx}"
    private const val lifecycleViewmodelSavedstate =
        "androidx.lifecycle:lifecycle-viewmodel-savedstate:${Versions.lifecycleViewModelKtx}"
    private const val lifecycleCompiler =
        "androidx.lifecycle:lifecycle-compiler:${Versions.lifecycleViewModelKtx}"


    override fun handler(handler: DependencyHandler) {
        handler.implementation(lifecycleViewmodelKtx)
        handler.implementation(lifecycleLivedataKtx)
        handler.implementation(lifecycleViewmodelSavedstate)
        handler.kapt(lifecycleCompiler)
//        // optional - helpers for implementing LifecycleOwner in a Service
//        implementation("androidx.lifecycle:lifecycle-service:$lifecycle_version")
//        // optional - ProcessLifecycleOwner provides a lifecycle for the whole application process
//        implementation("androidx.lifecycle:lifecycle-process:$lifecycle_version")
//        // optional - ReactiveStreams support for LiveData
//        implementation("androidx.lifecycle:lifecycle-reactivestreams-ktx:$lifecycle_version")
//
    }

}